<template>
  <ul class="todo-list">
    <TodoItem
      v-for="(todo, index) in list"
      :key="index"
      :todo="todo"
      @delete="$emit('delete', $event)"
      @toggle="$emit('toggle', $event)"
      @updata-todo="$emit('updata-todo', $event)"
    />
  </ul>
</template>

<script>
// @ 代表src

import TodoItem from "@/components/TodoItem.vue";

export default {
  props: {
    list: Array,
  },
  components: {
    TodoItem,
  },
};
</script>

<style>
ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
</style>